package com.mgm.user.service;

import java.util.List;

import com.mgm.dto.UserDto;
import com.mgm.page.DataGrid;
import com.mgm.pojo.User;
import com.mgm.result.IMessage;
import com.mgm.result.IResult;

public interface UserService {	
	
	//增加用户
	IMessage addUser(User user);
	//删除用户
	IMessage deleteUser(User user);
	//批量删除用户
	IMessage deleteById(List<Integer> ids);
	//修改用户
	IMessage updateUser(User user);
	//是否启用用户
	IMessage isEnabled(Integer id, Boolean enabled);
	//根据ID获取用户
	User selectById(Integer id);
	//查询
	List<User> findAll(User user);
	//分页查询
	DataGrid findAll(Integer pageNum, Integer pageSize);
	//根据用户名查询
	List<User> findByName(String name);
	
	IResult<UserDto> login(String account, String pwd);
	
	//验证token
	IMessage checkToken(String token);
	
}
